home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************/
- /* Name: noctrl() */
- /* Desc: captures interrput 9 so as to ignore ctrl-c,ctrl-break,*/
- /* ctrl-alt-del */
- /****************************************************************/
-
- void interrupt noctrl(void)
- {
- char byte;
- static int flag;
- extern void interrupt (*oldint9)(void);
-
- enable();
-
- if ((byte = inportb(0x60)) == 29)
- flag = 1;
-
- if (byte == 157)
- flag = 0;
-
- if (!flag)
- (*oldint9)();
- else switch (byte)
- {
- case 46 : /* yeah, these should be #defined! */
- case 70 :
- case 56 :
- case 83 :
- byte = inportb(0x61);
- outportb(0x61,byte | 0x80);
- outportb(0x61,byte);
- outportb(0x20,0x20);
- break;
- default :
- (*oldint9)();
- }
- }
-